﻿//-----------------------------------------------------------------------
// <copyright file="HasNegativeConditionals.cs" company="None">
//     Copyright (c) 2009-2012
// </copyright>
//-----------------------------------------------------------------------

namespace CleanCode.StyleCopCustomRules.UnitTests.Resources
{
    using System.Timers;

    /// <summary>
    /// Dummy class to unit test the customized StyleCop rules.
    /// </summary>
    public class HasNegativeConditionals
    {
        /// <summary>
        /// Dummy field holding the timer.
        /// </summary>
        private readonly Timer timer;

        /// <summary>
        /// Initializes a new instance of the <see cref="HasNegativeConditionals"/> class.
        /// </summary>
        public HasNegativeConditionals()
        {
            this.timer = new Timer();
            this.ShouldStart();
        }

        /// <summary>
        /// Determines whether the timer should start.
        /// </summary>
        private void ShouldStart()
        {
            if (!this.timer.AutoReset)
            {
                this.timer.Start();
            }
        }
    }
}
